<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>添加角色信息</title>
  <script>
	window.onload = function () {
	    var right = "${role.right}";
	}
  </script>
</head>
<body>
  <form id="form" action="RoleServlet?action=saveRole" method="post">
    <input type="hidden" name="id" value="${role1.id }">
	<table id="table">
	  <tr><td>角色名称：</td><td><input name="role" value="${role1.role }"></td></tr>
	  <tr>
	    <td>可查看模块：</td>
	    <td>
          <c:forEach var="role2" items="${roleList}">
            <div>
              <input type="checkbox" name="right" value="${role2.id}" ${role2.checked}>${role2.role}信息
            </div>
          </c:forEach>
          <div>
            <input type="checkbox" name="right" value="x" ${manager}>系统管理
          </div>
	    </td>
	  </tr>
	  <tr>
	    <td>维护字段：</td>
	    <td>
	      <div>
            <input type="checkbox" name="property1" value="account" checked disabled>账号
            <input type="checkbox" name="property1" value="password" checked disabled>密码
            <input type="checkbox" name="property1" value="name" checked disabled>姓名
            <input type="checkbox" name="property1" value="sex" checked disabled>性别
            <input type="checkbox" name="property1" value="role" checked disabled>角色
          </div>
          <div>
            <c:forEach var="property" items="${propertyList}">
              <input type="checkbox" name="property" value="${property.property}" ${property.checked}>${property.name}
            </c:forEach>
          </div>
        </td>
	  </tr>
	</table>
	<!-- <a onclick="addContinue">继续添加</a><br> -->
	<input type="hidden" name="role" value="${role}"/>
	<a href="javascript:document.getElementById('form').submit();">确认</a>
	<a href="javascript:history.go(-1)">返回</a>
  </form>
</body>
</html>